package com.javabasic.serialize.model;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author mir.xiong
 * @version 1.0
 * @description
 * @see
 * @since Created by work on 2021/12/5 12:05 下午
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "urlProtocolType", visible = true, defaultImpl = UrlType.class)
@JsonSubTypes({
        @JsonSubTypes.Type(value = HttpUrl.class, name = "HTTP"),
        @JsonSubTypes.Type(value = HttpsUrl.class, name = "HTTPS"),
})
public abstract class UrlType {
    protected UrlProtocolType urlProtocolType;
}
